home *** CD-ROM | disk | FTP | other *** search
-
-
- STRINGS ATTACHED
- by
- Matthew Oldham
-
-
- COMMODORE POWER/PLAY MAGAZINE
- August/September, 1986
-
-
- "It's a lovely day in the
-
- neighborhood.... Why, hello, boys and
-
- girls! Today we're going to explore
-
- two programs that demonstrate an
-
- important programming technique--
-
- string concatenation.
-
-
- "Can you say 'con-CAT-e-NA-tion'? I
-
- knew that you could...."
-
- ***
-
- String concatenation allows you to
-
- combine two or more different strings
-
- into a single string (A$=B$+C$) or
-
- expand an existing string with another
-
- string (A$=A$+B$). When you deal with
-
- data having repetitive elements, this
-
- technique saves programming space and
-
- running time.
-
-
- Oldham's HANGMAN II program
-
- ("Strings-2") demonstrates string
-
- concatenation. Words are constructed
-
- of repetive elements. HANGMAN II
-
- takes a list of these word parts, then
-
- reassembles the puzzle's words through
-
- the use of string concatenation.
-
-
- The "Strings-1" program shows that
-
- the string concatenation also works
-
- with graphic and graphic command
-
- strings. The vertical bar graph that
-
- you see was produced by the
-
- "Strings-1" program using string
-
- concatenation. (You cannot interact
-
- directly with this progam.)
-
- ***
-
- As you've probably guessed, there is
-
- more to "string concatenation" than
-
- we've dealt with here. If you are
-
- interested in learning more about this
-
- programming technique and its use in
-
- the two programs presented here,
-
- consult Matthew Oldham's article in
-
- the Commodore magazine cited above.
-
- DISK FILES USED:
-
- STRINGS MENU
- STRINGS.1
- STRINGS.2
-
- -----------< end of text >------------
-